home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Prograph Classic 2.6.1 / Prograph Reference Manual / Prograph Reference 1-4 / Prograph Reference 1-4.rsrc / TEXT_142.txt < prev    next >
Encoding:
Text File  |  1995-10-21  |  10.2 KB  |  316 lines

  1.  
  2. t    Window Descriptions*72*
  3.  
  4. In this section the edit windows are described, and allowable user actions in these windows discussed. We use the word ‚Äúwindow‚Äù here to mean ‚Äúedit window.‚Äù 
  5.  
  6. Every window has a close box, a zoom box, a grow box, and a banner containing a title consisting of an icon and a name, according to kind and identity of the structure displayed in the window. All windows except Value windows are nonmodal. Value windows are ‚Äúmovable modal‚Äù:  they may be dragged, and certain menus (Info, Edit and Find) remain enabled.
  7.  
  8. In this section, we first discuss the effects of actions on single selected elements. We then note how these effects generalize to groups of selected elements only if there is something special about the generalization.
  9.  
  10. The Universal Methods Window*72*
  11.  
  12. This window displays all universal methods. In this section, by ‚Äúmethod‚Äù we mean ‚Äúuniversal method.‚Äù
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. Opening*73*
  23.  
  24. This window appears when Universal Methods is selected from the Windows menu. 
  25.  
  26. Creating*73*
  27.  
  28. Clicking in space in the window creates a method icon with an insertion point below the icon for typing its name.
  29.  
  30. Deleting*73*
  31.  
  32. All Case windows of a deleted method are automatically closed.
  33.  
  34. Naming*73*
  35.  
  36. If the name of a method is a nonempty string, it must be distinct from the name of other methods and Mac Methods. A method can, however, have the same name as a primitive. Note that the Prograph Classic compiler requires all methods to have nonempty names.
  37.  
  38. Editing a Method*73*
  39.  
  40. Double-clicking a method opens a window on its first case.  
  41.  
  42. Combinations*73*
  43.  
  44. Double-clicking in space creates a new method and opens a window on its first case.
  45.  
  46. The Classes Window*74*
  47.  
  48. This window displays all classes. A parent class which contains hidden subclasses has an icon distinguished by an additional hexagonal border.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. Opening*74*
  65.  
  66. The Classes window is opened when one of the following actions occurs:
  67.  
  68. o when Classes is selected from the Windows menu;
  69.  
  70. o when the left end of an Instance generator for a nonexisting class is double-clicked. 
  71.  
  72. Creating*74*
  73.  
  74. Cmd-clicking in free space creates a class icon with an insertion point below its icon for typing its name.
  75.  
  76. Showing/Hiding Classes*74*
  77.  
  78. Selecting a subtree of classes, and then selecting Hide Classes from the Info menu, causes the subclass icons to disappear, and the parent class icon to assume a distinctive form, with an additional hexagonal border. Selecting a class which has hidden subclasses, and then selecting Show Classes from the Info menu, causes the ‚Äúfirst generation‚Äù of subclasses to appear (that is, subclasses which themselves have hidden subclasses are shown as ‚Äúencapsulating‚Äù class icons:  their subclasses are not shown).
  79.  
  80. Editing *75*
  81.  
  82. Delete*75*
  83.  
  84. The Attributes and Methods windows of the deleted class and Case windows on methods of the class are closed.  
  85.  
  86. Deletion of a class removes inheritance links to its subclasses and removes all inherited attributes from the subclasses.
  87.  
  88. A class cannot be deleted if:
  89.  
  90. o    an instance exists of the class or any of its successors, or
  91.  
  92. o    the class is a System class.
  93.  
  94. Copy Object*75*
  95.  
  96. This copies the selected class and all its ancestors into the Object clipboard. For example, if Copy Object is applied to class ‚Äúe,‚Äù the classes ‚Äúa,‚Äù ‚Äúc,‚Äù and ‚Äúe‚Äù are copied, together with their inheritance links.
  97.   ¬†
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. Paste Object*75*
  106.  
  107. This copies the class structure from the Object clipboard to the Classes window. The pasted classes are added or absorbed as described above in the discussion of incremental loading. 
  108.  
  109. Replicate Object*75*
  110.  
  111. Produces a new copy of the class. The copy is renamed and added as a subclass of the superclass of the original class.
  112.  
  113. Cut Object*75*
  114.  
  115. This is equivalent to the menu item Copy Object followed by Delete Object.
  116.  
  117. Naming*76*
  118.  
  119. Classes must have unique names. The names of System classes cannot be changed.  Do not use the names of any Mac types (such as Ptr, and Handle) or any of the following names:  array, attribute, class, method, number, natural, object, persistent, text.
  120.  
  121. Connecting / Disconnecting*76*
  122.  
  123. If class A is a selected class, Option-clicking on a class B creates an inheritance link from A to B. Class B and all its descendants inherit the attributes of A and their default values.
  124.  
  125. If B previously had a superclass C, then the link from C to B is deleted. 
  126.  
  127. Connection is not permitted if B has an attribute with the same name as that of an attribute in A. 
  128. _________________________________________
  129. NOTE:  Inheritance in System classes cannot be altered. 
  130. -----------------------------------------
  131.  
  132. Opening Classes*76*
  133.  
  134. A class icon is divided into two halves, each of which can be opened. A double-click:
  135.  
  136. o on the left side opens an Attributes window for the attributes of that class
  137.  
  138. o on the right side opens a Methods window for the methods of that class.
  139.  
  140. Combinations*76*
  141.  
  142. If A is the selected class, Option-clicking in space creates a class B and an inheritance link from A to B.
  143.  
  144. Group Selection*76*
  145.  
  146. Copy Object*76*
  147.  
  148. Copies into the Object clipboard the smallest subtrees of classes that includes all classes in the group and their ancestors. 
  149.  
  150. Replicate Object*76*
  151.  
  152. The classes that are replicated are the classes in the group, together with those classes that lie on a path of inheritance links between two classes of the group. A new copy of each subtree consisting of these classes is added; the added classes are renamed; and the root class of each added subtree is made a subclass of the superclass of the class of which it is a copy.
  153.  
  154. The Class Methods Window*77*
  155.  
  156. This window displays the methods of the class whose name appears in the window banner. 
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164. Opening*77*
  165.  
  166. The window is opened in response to one of the following actions:
  167.  
  168. o double-clicking on the right side of a class icon
  169.  
  170. o double-clicking on the right side of an Instance generator for an existing class*77*
  171.  
  172. o selecting Methods‚Ķ from the Windows menu , and then selecting a class from the dialog displaying a scrolling list of names of classes.
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  Selecting a member of the list and clicking the Select button opens the Methods window for the class and dismisses the dialog. This is equivalent to double-clicking a member of the list.
  183.  
  184. Creating *77*
  185.  
  186. Cmd-clicking in space creates a method icon with an insertion point below the icon for typing its name. 
  187.  
  188. Deleting*78*
  189.  
  190. All opened Case windows of a deleted method are automatically closed. 
  191.  
  192. Naming*78*
  193.  
  194. Four kinds of methods can be created in this window:  Simple, Get, Set, and Initialization. Methods within each of these categories must have unique names. 
  195. Methods of two different categories can have the same name, however, and the name of a method in a class can be the same as that of a primitive or Mac Method.
  196.  
  197. The name ¬´¬ª of an Initialization method cannot be edited.
  198.  
  199. Transforming a Class Method*78*
  200.  
  201. A selected class method icon can be transformed into a Get, Set, or Initialization method by annotating it with the appropriate item from the Opers menu, namely Get, Set or Instance. Annotating a method using Instance changes its name to ¬´¬ª.
  202.  
  203. Editing a Method*78*
  204.  
  205. Double-clicking a method opens a window on its first case.  
  206.  
  207. Combinations*78*
  208.  
  209. Cmd-double-clicking in space creates a new method and opens a window on its first case.
  210.  
  211. The Attributes Window*79*
  212.  
  213. This window displays the class and instance attributes of the class whose name appears in the window banner. 
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227. Opening*79*
  228.  
  229. An Attributes window is opened in response to one of the following actions:
  230.  
  231. o double-clicking on the left side of a class icon
  232.  
  233. o double-clicking on the left side of an Instance generator for an existing class
  234.  
  235. o selecting Attributes‚Ķ from the Windows menu opens a dialog displaying a scrolling list of names of classes, in exactly the same way as when the Methods‚Ķ menu item is selected (see above).
  236.  
  237. Attribute List Areas*79*
  238.  
  239. Class attributes are located above the fuzzy gray line (green on a color monitor) and instance attributes below. Class attributes have hexagonal icons, while instance attributes have triangular icons. 
  240.  
  241. Creating *79*
  242.  
  243. Cmd-clicking in space above the fuzzy gray line creates an unnamed class attribute with a default value of NULL. Cmd-clicking in space below the gray line creates an unnamed instance attribute with a default value of NULL. If other attributes exist, the relative position of the new attribute to the others depends on the position of the click. Inherited attributes, however, always precede the locally defined attributes.
  244.  
  245. Deleting *80*
  246.  
  247. Neither system attributes nor inherited attributes can be deleted.
  248.  
  249. Editing*80*
  250.  
  251. Attributes can be cut, copied, pasted, and replicated.
  252.  
  253. Naming*80*
  254.  
  255. The name of an attribute, if it is a nonempty string, must be unique. The names of system attributes and inherited attributes cannot be edited. The word ‚Äúdefault‚Äù is reserved by Prograph and should not be used as an attribute name.
  256.  
  257. Commenting*80*
  258.  
  259. Comments on attributes cannot be dragged.
  260.  
  261. Changing Default Values*80*
  262.  
  263. Double-clicking on an attribute opens a Value window displaying the default value of the attribute; this can be edited (see the ‚ÄúValue Window‚Äù section below in this chapter).
  264.  
  265. Some system attribute values cannot be edited (see chapter 5, ‚ÄúSystem Classes‚Äù).
  266.  
  267. Dragging*80*
  268.  
  269. The restrictions on dragging are:
  270.  
  271. o Dragging occurs in the vertical direction only.  
  272.  
  273. o A class attribute cannot be dragged below the gray line.
  274.  
  275. o An instance attribute cannot be dragged above the gray line.
  276.  
  277. o Inherited attributes cannot be dragged.
  278.  
  279. o Locally defined attributes cannot be dragged into inherited attributes. 
  280.  
  281. Combinations*81*
  282.  
  283. Cmd-double-clicking in space creates an attribute and opens a Value window onto its default value.  
  284.  
  285. Group selection*81*
  286.  
  287. Dragging*81*
  288.  
  289. Though a group of attributes can be selected, only one can be dragged. 
  290.  
  291. The Persistents Window*81*
  292.  
  293. This window displays all persistents.
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302. Opening*81*
  303.  
  304. This window is opened when Persistents is selected from the Windows menu.
  305.  
  306. Creating*81*
  307.  
  308. Cmd-clicking in space creates a new persistent icon with a default value of NULL and an insertion point below its icon for typing its name.
  309.  
  310. Naming*81*
  311.  
  312. Persistents must have unique names.
  313.  
  314. Changing Values*81*
  315.  
  316. Double-clicking on a persistent opens a Value window for displaying and editing the value of the persistent. Persistents are saved along with their Prograph document.